<template>
	<view class="detail">
		<view class="data">
			<view class="title">{{detail.title}}</view>
			<view class="box">编辑：{{detail.editor}}</view>
			<view class="box">时间：{{detail.createTime}}</view>
		</view>
		<view class="content" v-html="detail.content">

		</view>
	</view>
</template>

<script>
	import {
		getFundList
	} from '../../api/fund'
	import {
		formatRichImg
	} from '../../common'
	export default {
		data() {
			return {
				detail: {}
			}
		},
		onLoad(data) {
			this.id = data.id
			this.getDetail()
		},
		methods: {
			async getDetail() {
				let res = await getFundList({
					id: this.id
				})
				let data = res.data.data[0]
				data.content = formatRichImg(data.content)
				this.detail = data
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #f3f3f3;
	}

	.detail {
		margin: 30rpx auto;
		padding: 20rpx;

		.data {
			.title {
				font-size: 40rpx;
				font-weight: 600;
				letter-spacing: 2rpx;
				text-align: center;
				margin-bottom: 10rpx;
			}
			.box {
				color: #8b8b8b;
				margin-bottom: 10rpx;
			}
		}
	}
</style>